package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "tfylinkman_form", schema = "springboot", catalog = "")
public class TfylinkmanForm {
    private Integer linkmanId;//联系人ID
    private TfyclientForm clientId;//客户表客户ID
    private String linkmanName;//联系人名称
    private String linkmanPhone;//联系人电话号码
    private String linkmanMobile;//联系人手机号码
    private String emailAddress;//联系人电子邮箱
    private String keyPolicymaker;//联系人是否关键决策人
    private String linkmanPosition;//联系人职位
    private String linkmanSex;//联系人性别
    private String linkmanSite;//联系人地址
    private String linkmanSitexq;//联系人地址详情
    private String linkmanSz;//地址数字
    private Timestamp linkmanTime;//联系人下次联系时间
    private String linkmanRemark;//联系人备注
    private Timestamp linkmanBirthday;//联系人出生日期
    private String linkmanPeople;//联系人的负责员工
    private String linkmanCjpeople;//联系人创建人
    private Timestamp linkmanNowtime;//联系人创建时间
    private Timestamp linkmanUpdate;//联系人更新时间
    private int linkmanState;//删除客户状态
    private QempFrom empId;//负责人

    @Id
    @Column(name = "linkman_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "seq")
    public Integer getLinkmanId() {
        return linkmanId;
    }

    public void setLinkmanId(Integer linkmanId) {
        this.linkmanId = linkmanId;
    }

    //联系人多对客户一
    @ManyToOne
    @JoinColumn(name="client_id")
    public TfyclientForm getClientId() {
        return clientId;
    }

    public void setClientId(TfyclientForm clientId) {
        this.clientId = clientId;
    }

    //联系人多对员工一
    @ManyToOne
    @JoinColumn(name = "emp_id")
    public QempFrom getEmpId() {
        return empId;
    }

    public void setEmpId(QempFrom empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "linkman_sz")
    public String getLinkmanSz() {
        return linkmanSz;
    }

    public void setLinkmanSz(String linkmanSz) {
        this.linkmanSz = linkmanSz;
    }

    @Basic
    @Column(name = "linkman_name")
    public String getLinkmanName() {
        return linkmanName;
    }

    public void setLinkmanName(String linkmanName) {
        this.linkmanName = linkmanName;
    }

    @Basic
    @Column(name = "linkman_phone")
    public String getLinkmanPhone() {
        return linkmanPhone;
    }

    public void setLinkmanPhone(String linkmanPhone) {
        this.linkmanPhone = linkmanPhone;
    }

    @Basic
    @Column(name = "linkman_mobile")
    public String getLinkmanMobile() {
        return linkmanMobile;
    }

    public void setLinkmanMobile(String linkmanMobile) {
        this.linkmanMobile = linkmanMobile;
    }

    @Basic
    @Column(name = "email_address")
    public String getEmailAddress() {
        return emailAddress;
    }

    public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }

    @Basic
    @Column(name = "key_policymaker")
    public String getKeyPolicymaker() {
        return keyPolicymaker;
    }

    public void setKeyPolicymaker(String keyPolicymaker) {
        this.keyPolicymaker = keyPolicymaker;
    }

    @Basic
    @Column(name = "linkman_position")
    public String getLinkmanPosition() {
        return linkmanPosition;
    }

    public void setLinkmanPosition(String linkmanPosition) {
        this.linkmanPosition = linkmanPosition;
    }

    @Basic
    @Column(name = "linkman_sex")
    public String getLinkmanSex() {
        return linkmanSex;
    }

    public void setLinkmanSex(String linkmanSex) {
        this.linkmanSex = linkmanSex;
    }

    @Basic
    @Column(name = "linkman_site")
    public String getLinkmanSite() {
        return linkmanSite;
    }

    public void setLinkmanSite(String linkmanSite) {
        this.linkmanSite = linkmanSite;
    }

    @Basic
    @Column(name = "linkman_sitexq")
    public String getLinkmanSitexq() {
        return linkmanSitexq;
    }

    public void setLinkmanSitexq(String linkmanSitexq) {
        this.linkmanSitexq = linkmanSitexq;
    }

    @Basic
    @Column(name = "linkman_time")
    public Timestamp getLinkmanTime() {
        return linkmanTime;
    }

    public void setLinkmanTime(Timestamp linkmanTime) {
        this.linkmanTime = linkmanTime;
    }

    @Basic
    @Column(name = "linkman_remark")
    public String getLinkmanRemark() {
        return linkmanRemark;
    }

    public void setLinkmanRemark(String linkmanRemark) {
        this.linkmanRemark = linkmanRemark;
    }

    @Basic
    @Column(name = "linkman_birthday")
    public Timestamp getLinkmanBirthday() {
        return linkmanBirthday;
    }

    public void setLinkmanBirthday(Timestamp linkmanBirthday) {
        this.linkmanBirthday = linkmanBirthday;
    }

    @Basic
    @Column(name = "linkman_people")
    public String getLinkmanPeople() {
        return linkmanPeople;
    }

    public void setLinkmanPeople(String linkmanPeople) {
        this.linkmanPeople = linkmanPeople;
    }

    @Basic
    @Column(name = "linkman_cjpeople")
    public String getLinkmanCjpeople() {
        return linkmanCjpeople;
    }

    public void setLinkmanCjpeople(String linkmanCjpeople) {
        this.linkmanCjpeople = linkmanCjpeople;
    }

    @Basic
    @Column(name = "linkman_nowtime")
    public Timestamp getLinkmanNowtime() {
        return linkmanNowtime;
    }

    public void setLinkmanNowtime(Timestamp linkmanNowtime) {
        this.linkmanNowtime = linkmanNowtime;
    }

    @Basic
    @Column(name = "linkman_update")
    public Timestamp getLinkmanUpdate() {
        return linkmanUpdate;
    }

    public void setLinkmanUpdate(Timestamp linkmanUpdate) {
        this.linkmanUpdate = linkmanUpdate;
    }

    @Basic
    @Column(name = "linkman_state")
    public int getLinkmanState() {
        return linkmanState;
    }

    public void setLinkmanState(int linkmanState) {
        this.linkmanState = linkmanState;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TfylinkmanForm that = (TfylinkmanForm) o;
        return linkmanId == that.linkmanId &&
                Objects.equals(clientId, that.clientId) &&
                Objects.equals(linkmanName, that.linkmanName) &&
                Objects.equals(emailAddress, that.emailAddress) &&
                Objects.equals(keyPolicymaker, that.keyPolicymaker) &&
                Objects.equals(linkmanPosition, that.linkmanPosition) &&
                Objects.equals(linkmanSex, that.linkmanSex) &&
                Objects.equals(linkmanSite, that.linkmanSite) &&
                Objects.equals(linkmanTime, that.linkmanTime) &&
                Objects.equals(linkmanRemark, that.linkmanRemark) &&
                Objects.equals(linkmanBirthday, that.linkmanBirthday) &&
                Objects.equals(linkmanPeople, that.linkmanPeople) &&
                Objects.equals(linkmanCjpeople, that.linkmanCjpeople) &&
                Objects.equals(linkmanNowtime, that.linkmanNowtime) &&
                Objects.equals(linkmanUpdate, that.linkmanUpdate);
    }

    @Override
    public int hashCode() {
        return Objects.hash(linkmanId, clientId, linkmanName, emailAddress, keyPolicymaker, linkmanPosition, linkmanSex, linkmanSite, linkmanTime, linkmanRemark, linkmanBirthday, linkmanPeople, linkmanCjpeople, linkmanNowtime, linkmanUpdate);
    }

    public TfylinkmanForm() {
    }

    public TfylinkmanForm(Integer linkmanId, TfyclientForm clientId, String linkmanName, String linkmanPhone, String linkmanMobile, String emailAddress, String keyPolicymaker, String linkmanPosition, String linkmanSex, String linkmanSite, String linkmanSz, Timestamp linkmanTime, String linkmanRemark, Timestamp linkmanBirthday, String linkmanPeople, String linkmanCjpeople, Timestamp linkmanNowtime, Timestamp linkmanUpdate, int linkmanState, QempFrom empId) {
        this.linkmanId = linkmanId;
        this.clientId = clientId;
        this.linkmanName = linkmanName;
        this.linkmanPhone = linkmanPhone;
        this.linkmanMobile = linkmanMobile;
        this.emailAddress = emailAddress;
        this.keyPolicymaker = keyPolicymaker;
        this.linkmanPosition = linkmanPosition;
        this.linkmanSex = linkmanSex;
        this.linkmanSite = linkmanSite;
        this.linkmanSz = linkmanSz;
        this.linkmanTime = linkmanTime;
        this.linkmanRemark = linkmanRemark;
        this.linkmanBirthday = linkmanBirthday;
        this.linkmanPeople = linkmanPeople;
        this.linkmanCjpeople = linkmanCjpeople;
        this.linkmanNowtime = linkmanNowtime;
        this.linkmanUpdate = linkmanUpdate;
        this.linkmanState = linkmanState;
        this.empId = empId;
    }
}
